const express = require('express');
const router = express.Router();

// 引入控制器
const InventoryController = require('../controller/InventoryController');
const inventoryController = new InventoryController();

// 库存监控-库存列表
router.get('/getInventory', (req, res) => {
    return inventoryController.getInventory(req, res);
});

// 库存监控-修改库存-获取信息-商品信息
router.get('/getgoodsinfo/:goods_id', (req, res) => {
    return inventoryController.getgoodsinfo(req, res);
});
// 库存监控-修改库存-获取信息-仓库信息
router.get('/getHouseInfo', (req, res) => {
    return inventoryController.getHouseInfo(req, res);
});
// 库存监控-修改库存
router.put('/putInventoryInfo', (req, res) => {
    return inventoryController.putInventoryInfo(req, res);
});
//库存监控-添加库存 
router.post('/addInventory', (req, res) => {
    return inventoryController.addInventory(req, res);
});

// 库存监控-添加日志
router.post('/addInventoryLog', (req, res) => {
    return inventoryController.addInventoryLog(req, res);
});

// 库存监控-获取库存日志
router.get('/getInventoryLog', (req, res) => {
    return inventoryController.getInventoryLog(req, res);
});
// 库存监控-获取仓库区域信息
router.get('/getAreaInfo', (req, res) => {
    return inventoryController.getAreaInfo(req, res);
});
// 库存监控-获取仓库信息
router.get('/getHouseInfoById', (req, res) => {
    return inventoryController.getHouseInfoById(req, res);
});

// 库存监控根据商品id获取型号规格当前数量

// 库存监控-根据商品id获取型号规格当前数量
router.get('/getInventoryByGoodsId', (req, res) => {
    return inventoryController.getInventoryByGoodsId(req, res);
});

module.exports = router;